<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of SoBizTransactionLog
 *
 * @author Alen
 */
class SoBizTransactionLog extends SoBizBase {
    //put your code here
    public function __construct() {
        parent::__construct();
        $this->dm->tablename='tfinancetransactionlog';
    }
    
    
    /**
     * 获取分页数据
     * @param type $pager_text
     * @param type $dataset
     * @param type $pageid
     * @param type $keyword
     * @since 1.0.0 2012-12-14 sutroon
     */
    public function get_paging_data(&$pager_text,&$dataset,$pageid,$keyword){        
        // 获取分页数据
        $pager=new SoDataPager($pageid);
	$sqlc=$keyword?:'';
        if($keyword){
            if(start_with($keyword, '|')){
                $sqlc=' where UserName=\''. substr($keyword, 1).'\'';
            }else{
                $sqlc=' where UserName like \'%'.$keyword.'%\'';
            }
        }
        
        $dataset=$this->dm->select_pagingset($pager->pageid,$pager->pagesize,$pager->recordcount,'tfinancetransactionlog '.$sqlc ,'CreatedTime desc','*');        
        $pager->set_dataset($dataset,$pager->recordcount);        
        $pager_text=$pager->get_pager_text(set_url_param(array('page'=>'.pageid.')));
    }
}
